package com.flynn.rock.system.entity;

import com.flynn.rock.enums.system.AuthorityStatus;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

@Getter
@Setter
@Entity
@Table(name = "sys_authority")
public class SysAuthorityEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "authority_id", nullable = false)
    private Long authorityId;

    @Column(name = "authority_code", length = 64)
    private String authorityCode;

    @Column(name = "authority_name", length = 64)
    private String authorityName;

    @Column(name = "order_number")
    private Integer orderNumber;

    @Column(name = "create_user_id")
    private Long createUserId;

    @Column(name = "create_time")
    private LocalDateTime createTime;

    @Column(name = "update_time")
    private LocalDateTime updateTime;

    @Enumerated(EnumType.STRING)
    @Column(name = "status", length = 32)
    private AuthorityStatus status;

    @Column(name = "remark", length = 64)
    private String remark;
}